﻿using PMS.XCMG.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace PMS.XCMG.OpenApi.Models
{
    /// <summary>
    /// 计划备料情况
    /// </summary>
    public class PlanDeliveryState
    {
        /// <summary>
        /// 计划编号
        /// </summary>
        public string PlanId { set; get; }

        /// <summary>
        /// 产品电气编码
        /// </summary>
        public string EleCode { set; get; }
        /// <summary>
        /// 计划编码
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 计划名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 计划数量（按台套）
        /// </summary>
        public int Count { set; get; }
        /// <summary>
        /// 强制办结数据/已配送最大数量（按台套）
        /// </summary>
        public int ManualEndCount { set; get; }
        /// <summary>
        /// 实际完成数量（按台套）
        /// </summary>
        public int Quantity { set; get; }
        /// <summary>
        /// 计划日期
        /// </summary>
        public string PlanDate { set; get; }
        /// <summary>
        /// 计划状态
        /// </summary>
        public PlanStatus Status { set; get; }
        /// <summary>
        /// 物料配送状态
        /// </summary>
        public DeliveryStatus DeliveryState { set; get; }

        public List<Prepare> Prepares { set; get; }
    }

    /// <summary>
    /// 备料信息
    /// </summary>
    public class Prepare
    {
        /// <summary>
        /// PlanPrepare.Id
        /// </summary>
        public string Id { set; get; }
        /// <summary>
        /// 电气编码
        /// </summary>
        public string EleCode { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 物料规格
        /// </summary>
        public string SpecName { set; get; }
        /// <summary>
        /// 需备件数量（按台套）
        /// </summary>
        public int Count { set; get; }
        /// <summary>
        /// 备料区库存数量（按台套）
        /// </summary>
        public int Quantity { set; get; }
        /// <summary>
        /// 已配送数量（按台套）
        /// </summary>
        public int DeliveryCount { set; get; }
    }
}
